package com.mc.web.controller.gpm;

import com.mc.common.core.controller.BaseController;
import com.mc.common.core.page.TableDataInfo;
import com.mc.gpm.domain.GpmStorage;
import com.mc.gpm.service.IGpmStorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/gpm/storage")
public class GpmStorageController extends BaseController {

    @Autowired
    private IGpmStorageService gpmStorageService;

    /**
     * 查询种质资源库列表
     */
    @PreAuthorize("@ss.hasPermi('gpm:storage:list')")
    @GetMapping("/list")
    public TableDataInfo list(GpmStorage gpmStorage)
    {
        startPage();
        List<GpmStorage> list = gpmStorageService.selectGpmStorageList(gpmStorage);
        return getDataTable(list);
    }

}
